package 二叉树;

/**
 * @Author Weton Li
 * @Date 2021/3/21 17:44
 */
public class 递归 {
    public static int factorial(int n){

        if (n==0){
            return 1;
        }
        return factorial(n-1)*n;
//        System.out.println("递归");
    }

    public static void main(String[] args) {
        int factorial = factorial(4);
        System.out.println(factorial);
    }
}
